<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>05_流程控制</title>
</head>
<body>
<script>
    console.log('1');
    console.log('2');
    console.log('3');
    let username = 'rose';
    if (!username) {
        // alert('请输入用户名');
    } else {
        // alert('欢迎登录');
    }

    let gender = 0;
    switch (gender) {
        case 1:
            console.log('男');
        case 0:
            console.log('女');
            break;
        default:
            console.log('未知');
    }

    let names = ['张三', '李四', '王五'];
    for (let i = 0; i < names.length; i++) {
        console.log(names[i]);
    }
    // console.log(i)

    for(let name of names){
        console.log(name);
    }

</script>
</body>
</html>